package com.hxkj.domain.po;

import java.io.Serializable;
import java.util.List;
import java.util.Objects;

/**
 * @ClassName FunctionLibraryTree 功能库树形封装实体
 * @Description TODO
 * @Author Mr.zheng
 * @Date 2018/6/27 12:20
 * @Version 1.0
 */
public class FunctionLibraryTree implements Serializable {


    private static final long serialVersionUID = -122359011115073264L;
    // 功能ID
    private Long id;
    // 功能权限编码
    private String functionCode;
    // 功能权限名称
    private String functionName;
    // 说明
    private String description;
    // 功能权限类型(1 菜单、2 功能、3按钮)
    private Byte functionType;
    // 功能权限链接
    private String functionUri;
    // 功能状态
    private Byte functionStatus;
    // 上级功能id
    private Long parentFunctionId;
    // 删除标识
    private Byte delTag;
    // 子站id字符串
    private String siteIds;
    // 创建时间
    private Long createTime;
    // 更新时间
    private Long updateTime;
    //
    private String functionIcon;

    private List<FunctionLibraryTree> children;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getFunctionCode() {
        return functionCode;
    }

    public void setFunctionCode(String functionCode) {
        this.functionCode = functionCode;
    }

    public String getFunctionName() {
        return functionName;
    }

    public void setFunctionName(String functionName) {
        this.functionName = functionName;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Byte getFunctionType() {
        return functionType;
    }

    public void setFunctionType(Byte functionType) {
        this.functionType = functionType;
    }

    public String getFunctionUri() {
        return functionUri;
    }

    public void setFunctionUri(String functionUri) {
        this.functionUri = functionUri;
    }

    public Byte getFunctionStatus() {
        return functionStatus;
    }

    public void setFunctionStatus(Byte functionStatus) {
        this.functionStatus = functionStatus;
    }

    public Long getParentFunctionId() {
        return parentFunctionId;
    }

    public void setParentFunctionId(Long parentFunctionId) {
        this.parentFunctionId = parentFunctionId;
    }

    public Byte getDelTag() {
        return delTag;
    }

    public void setDelTag(Byte delTag) {
        this.delTag = delTag;
    }

    public String getSiteIds() {
        return siteIds;
    }

    public void setSiteIds(String siteIds) {
        this.siteIds = siteIds;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public Long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Long updateTime) {
        this.updateTime = updateTime;
    }

    public String getFunctionIcon() {
        return functionIcon;
    }

    public void setFunctionIcon(String functionIcon) {
        this.functionIcon = functionIcon;
    }

    public List<FunctionLibraryTree> getChildren() {
        return children;
    }

    public void setChildren(List<FunctionLibraryTree> children) {
        this.children = children;
    }

    @Override
    public String toString() {
        return "FunctionLibraryTree{" +
                "id=" + id +
                ", functionCode='" + functionCode + '\'' +
                ", functionName='" + functionName + '\'' +
                ", description='" + description + '\'' +
                ", functionType=" + functionType +
                ", functionUri='" + functionUri + '\'' +
                ", functionStatus=" + functionStatus +
                ", parentFunctionId=" + parentFunctionId +
                ", delTag=" + delTag +
                ", siteIds='" + siteIds + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", functionIcon='" + functionIcon + '\'' +
                ", children=" + children +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof FunctionLibraryTree)) return false;
        FunctionLibraryTree that = (FunctionLibraryTree) o;
        return Objects.equals(getId(), that.getId()) &&
                Objects.equals(getFunctionCode(), that.getFunctionCode()) &&
                Objects.equals(getFunctionName(), that.getFunctionName()) &&
                Objects.equals(getDescription(), that.getDescription()) &&
                Objects.equals(getFunctionType(), that.getFunctionType()) &&
                Objects.equals(getFunctionUri(), that.getFunctionUri()) &&
                Objects.equals(getFunctionStatus(), that.getFunctionStatus()) &&
                Objects.equals(getParentFunctionId(), that.getParentFunctionId()) &&
                Objects.equals(getDelTag(), that.getDelTag()) &&
                Objects.equals(getSiteIds(), that.getSiteIds()) &&
                Objects.equals(getCreateTime(), that.getCreateTime()) &&
                Objects.equals(getUpdateTime(), that.getUpdateTime()) &&
                Objects.equals(getFunctionIcon(), that.getFunctionIcon()) &&
                Objects.equals(getChildren(), that.getChildren());
    }

    @Override
    public int hashCode() {

        return Objects.hash(getId(), getFunctionCode(), getFunctionName(), getDescription(), getFunctionType(), getFunctionUri(), getFunctionStatus(), getParentFunctionId(), getDelTag(), getSiteIds(), getCreateTime(), getUpdateTime(), getFunctionIcon(), getChildren());
    }
}
